#ifndef _H_I_SERVICE_RESOLVER_H_
#define _H_I_SERVICE_RESOLVER_H_

#include "../typedefine.h"

namespace QWER
{
	QCLASS IRunner;
	QCLASS CServiceBackendHelper;
	template<typename T> class CNewBackendMsg;

	QDLL_EXPORT QCLASS IServiceBackend QABSTRACT
	{
	public:
		IServiceBackend();
#ifndef _USING_CLI
		~IServiceBackend();
#endif

	protected:
		virtual void _Awake(CServiceBackendHelper* poHelper) = 0;

	private:
		PTR(CServiceBackendHelper) m_poHelper;

#ifdef _USING_CLI
	internal:
#else
	private:
		friend class IRunner;
		template<typename T> friend class CNewBackendMsg;
#endif
		void _ExecAwake();
		PTR(CServiceBackendHelper) _ServiceBackendHelper() { return m_poHelper; }
	};
}

#endif
